﻿@{
    Layout = null;
    //按钮列表
    List<AuthorDesign.Model.PageAction> actionList = PageData["ActionList"] as List<AuthorDesign.Model.PageAction>;

    IEnumerable<AuthorDesign.Model.PageMenuAction> pageMenuList = PageData["PageMenuList"] as IEnumerable<AuthorDesign.Model.PageMenuAction>;
    int Pid = (int)PageData["Pid"];
}
@if (pageMenuList != null && pageMenuList.Count() > 0) {
    foreach (var item in pageMenuList.Where(m=>m.PId==Pid)) {
        string[] ss = string.IsNullOrEmpty(item.ActionList) ? new string[] { } : item.ActionList.Split(',');
    
    <div class="competence">
    <div class="competence-t">
        <input type="checkbox" value="@item.Id" onclick="selectMenu(this)"> @item.Name
    </div>
    <div class="competence-b">
        @foreach (var actionItem in actionList) {
            if (AuthorDesign.Web.App_Start.Common.PublicFunction.IsContentNum(ss, actionItem.Id)) {
                <input type="checkbox" value="@actionItem.Id" data-actionLevel="@actionItem.ActionLevel" onclick="selectSign(this)"> @actionItem.Name
            }
        }
    </div>
</div>
        var childMenu = pageMenuList.Where(m => m.PId == item.Id);
        if (childMenu.Count() > 0) {
       @RenderPage("/Areas/Admin/Views/Role/DisplayTemplates/RoleActionTemp.cshtml", new { ActionList = actionList, PageMenuList = childMenu, Pid = item.Id })
        }
    }
}

